/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

/*
 * OperatorServerApplication.java
 *
 * Created on Sep 5, 2011, 12:41:16 AM
 */
package operator.server.gui;

import java.awt.Color;
import java.awt.Dimension;
import java.awt.Toolkit;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.io.IOException;
import java.io.OutputStream;
import java.io.PrintStream;
import java.text.SimpleDateFormat;
import java.util.Date;
import javax.swing.Timer;
import javax.swing.JLabel;
import javax.swing.JOptionPane;
import operator.server.OperatorServer;
import share.IPAddressFormatter;
import share.TimerLabel;

/**
 *
 * @author mire
 */
public class OperatorServerApplication extends javax.swing.JFrame {

    /** Creates new form OperatorServerApplication */
    public OperatorServerApplication() {
        initComponents();
        this.operatorServer = null;

        redirectSystemStreams();
        //Center frame
        Dimension screenSize = Toolkit.getDefaultToolkit().getScreenSize();
        Dimension size = this.getSize();
        screenSize.height = screenSize.height / 2;
        screenSize.width = screenSize.width / 2;
        size.height = size.height / 2;
        size.width = size.width / 2;
        int y = screenSize.height - size.height;
        int x = screenSize.width - size.width;
        this.setLocation(x, y);
    }

    private void setServerOnline() {

        myAddressLabel.setEnabled(true);
        myAddress.setText(operatorServer.getAddress());

        operatorServerStatus.setText("Подигнут");
        operatorServerStatus.setForeground(Color.green);

        Integer num = 0;

        centralAddressLabel.setEnabled(true);
        centralAddress.setEnabled(true);
        centralAddress.setText(operatorServer.getCentralAddress());

        globalPortLabel.setEnabled(true);
        num = operatorServer.getGlobalCentralPort();
        globalCentralPort.setEnabled(true);
        globalCentralPort.setText(num.toString());

        centralPortLabel.setEnabled(true);
        num = operatorServer.getCentralPort();
        centralPort.setEnabled(true);
        centralPort.setText(num.toString());

        operatorPortLabel.setEnabled(true);
        num = operatorServer.getOperatorPort();
        operatorPort.setEnabled(true);
        operatorPort.setText(num.toString());

        clientPortLabel.setEnabled(true);
        num = operatorServer.getClientPort();
        clientPort.setEnabled(true);
        clientPort.setText(num.toString());

        prefixesLabel.setEnabled(true);
        String[] splited = operatorServer.getOperatorPrefix();
        String line = "";
        for (int i = 0; i < splited.length; i++) {
            if (i != 0) {
                line += " ";
            }
            line += splited[i];
        }
        prefixes.setEnabled(true);
        prefixes.setText(line);

        aliveTimeoutLabel.setEnabled(true);
        num = operatorServer.getAliveTimeout();
        aliveTimeout.setEnabled(true);
        aliveTimeout.setText(num.toString());

        waitTimeoutLabel.setEnabled(true);
        num = operatorServer.getWaitForAnswerTime();
        waitTimeout.setEnabled(true);
        waitTimeout.setText(num.toString());

        noThreadsLabel.setEnabled(true);
        num = operatorServer.getThreadNo();
        noThreads.setEnabled(true);
        noThreads.setText(num.toString());

        lastTimeSynchronizedLabel.setEnabled(true);
        lastTimeSynchronized.setEnabled(true);
        ((SyncLabel) lastTimeSynchronized).start(operatorServer);

        operatorServerStatusTimer.setEnabled(true);
        ((TimerLabel) operatorServerStatusTimer).start();

        OperatorUsersInfo operatorUsersInfo = new OperatorUsersInfo(operatorServer.getUsers());
        jTabbedPane.addTab("Корисници", operatorUsersInfo);
        OperatorServerInfo serversInfoTable = new OperatorServerInfo(operatorServer.getServers());
        jTabbedPane.addTab("Сервери", serversInfoTable);
        OperatorClientsInfo operatorClientsInfo = new OperatorClientsInfo(operatorServer.getClients());
        jTabbedPane.addTab("Клијенти", operatorClientsInfo);

        this.setTitle(operatorServer.getOperatorName() + " сервер");

        (new Thread(operatorServer)).start();

        this.repaint();

    }

    private class SyncLabel extends JLabel {

        public SyncLabel() {
            this.setText("00:00:00");
            this.timerFormat = new SimpleDateFormat("HH:mm:ss");

            this.lastTimeSync = null;
            setTimer();
        }

        public void start(OperatorServer operatorServer) {
            this.operatorServer = operatorServer;
            t.start();
        }

        private void setTimer() {
            t = new javax.swing.Timer(1000, new ActionListener() {

                @Override
                public void actionPerformed(ActionEvent e) {
                    if (operatorServer != null) {
                        Date newSyncTime = operatorServer.getLastTimeSynchronized();
                        if (newSyncTime != null) {
                            if (!newSyncTime.equals(lastTimeSync)) {
                                lastTimeSync = newSyncTime;
                                setText(timerFormat.format(lastTimeSync));
                                repaint();
                            }
                        }
                    }
                }
            });

        }
        private Timer t;
        private Date lastTimeSync;
        private SimpleDateFormat timerFormat;
        private OperatorServer operatorServer;
    }

    private void updateTextArea(final String text) {
        javax.swing.SwingUtilities.invokeLater(new Runnable() {

            @Override
            public void run() {
                redirectedTextArea.append(text);
            }
        });
    }

    private void redirectSystemStreams() {
        OutputStream out = new OutputStream() {

            @Override
            public void write(int b) throws IOException {
                updateTextArea(String.valueOf((char) b));
            }

            @Override
            public void write(byte[] b, int off, int len) throws IOException {
                updateTextArea(new String(b, off, len));
            }

            @Override
            public void write(byte[] b) throws IOException {
                write(b, 0, b.length);
            }
        };

        System.setOut(new PrintStream(out, true));
        System.setErr(new PrintStream(out, true));
    }

    /** This method is called from within the constructor to
     * initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is
     * always regenerated by the Form Editor.
     */
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        authorDialog = new javax.swing.JDialog();
        authorAvatarLabel = new javax.swing.JLabel();
        authorNameLabel = new javax.swing.JLabel();
        authorIndexLabel = new javax.swing.JLabel();
        authorMailLabel = new javax.swing.JLabel();
        startDialog = new javax.swing.JDialog();
        startAliveTimeoutLabel = new javax.swing.JLabel();
        startAliveTimeoutTextField = new javax.swing.JFormattedTextField();
        startClientPortTextField = new javax.swing.JFormattedTextField();
        startNoThreadsLabel = new javax.swing.JLabel();
        startNoThreadsTextField = new javax.swing.JFormattedTextField();
        startWaitTimeoutLabel = new javax.swing.JLabel();
        startWaitTimeoutTextField = new javax.swing.JFormattedTextField();
        startOperatorPrefixTextField = new javax.swing.JFormattedTextField();
        startFirstServerChoiceLabel = new javax.swing.JLabel();
        startFirstServerYes = new javax.swing.JRadioButton();
        startGlobalCentralPortTextField = new javax.swing.JFormattedTextField();
        startOperatorAddressLabel = new javax.swing.JLabel();
        startGlobalCentralPortLabel = new javax.swing.JLabel();
        startOperatorAddressTextField = new javax.swing.JFormattedTextField(new IPAddressFormatter());
        startOperatorNameTextField = new javax.swing.JFormattedTextField();
        startOperatorPrefixLabel = new javax.swing.JLabel();
        startOperatorNameLabel = new javax.swing.JLabel();
        startButtonCancel = new javax.swing.JButton();
        startButtonOK = new javax.swing.JButton();
        startCentralAddressLabel = new javax.swing.JLabel();
        startCentralAddressTextField = new javax.swing.JFormattedTextField(new IPAddressFormatter());
        startOperatorPortTextField = new javax.swing.JFormattedTextField();
        startCentralPortLabel = new javax.swing.JLabel();
        startCentralPortTextField = new javax.swing.JFormattedTextField();
        startOperatorPortLabel = new javax.swing.JLabel();
        startFirstServerNo = new javax.swing.JRadioButton();
        startClientPortLabel = new javax.swing.JLabel();
        jTabbedPane = new javax.swing.JTabbedPane();
        redirectedScrollPane = new javax.swing.JScrollPane();
        redirectedTextArea = new javax.swing.JTextArea();
        operatorServerStatus = new javax.swing.JLabel();
        operatorServerStatusLabel = new javax.swing.JLabel();
        operatorServerStatusTimer = new TimerLabel();
        centralAddressLabel = new javax.swing.JLabel();
        centralAddress = new javax.swing.JLabel();
        centralPortLabel = new javax.swing.JLabel();
        centralPort = new javax.swing.JLabel();
        operatorPortLabel = new javax.swing.JLabel();
        operatorPort = new javax.swing.JLabel();
        clientPort = new javax.swing.JLabel();
        clientPortLabel = new javax.swing.JLabel();
        aliveTimeoutLabel = new javax.swing.JLabel();
        aliveTimeout = new javax.swing.JLabel();
        waitTimeout = new javax.swing.JLabel();
        waitTimeoutLabel = new javax.swing.JLabel();
        noThreadsLabel = new javax.swing.JLabel();
        noThreads = new javax.swing.JLabel();
        jSeparator1 = new javax.swing.JSeparator();
        jSeparator2 = new javax.swing.JSeparator();
        lastTimeSynchronizedLabel = new javax.swing.JLabel();
        lastTimeSynchronized = new SyncLabel();
        myAddressLabel = new javax.swing.JLabel();
        myAddress = new javax.swing.JLabel();
        prefixesLabel = new javax.swing.JLabel();
        prefixes = new javax.swing.JLabel();
        globalCentralPort = new javax.swing.JLabel();
        globalPortLabel = new javax.swing.JLabel();
        menuBar = new javax.swing.JMenuBar();
        fileMenu = new javax.swing.JMenu();
        startMenuItem = new javax.swing.JMenuItem();
        exitMenuItem = new javax.swing.JMenuItem();
        helpMenu = new javax.swing.JMenu();
        authorMenuItem = new javax.swing.JMenuItem();

        authorDialog.setTitle("О аутору");
        authorDialog.setMinimumSize(new java.awt.Dimension(410, 150));
        authorDialog.setResizable(false);

        authorAvatarLabel.setIcon(new javax.swing.ImageIcon(getClass().getResource("/share/icons/avatar_100.png"))); // NOI18N

        authorNameLabel.setFont(new java.awt.Font("Courier New", 1, 18));
        authorNameLabel.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
        authorNameLabel.setText(" Мирко Француски");

        authorIndexLabel.setFont(new java.awt.Font("Courier New", 1, 18));
        authorIndexLabel.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
        authorIndexLabel.setText(" 225/06");

        authorMailLabel.setFont(new java.awt.Font("Courier New", 1, 18));
        authorMailLabel.setForeground(new java.awt.Color(0, 0, 255));
        authorMailLabel.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
        authorMailLabel.setText(" fm060225d@student.etf.rs");

        javax.swing.GroupLayout authorDialogLayout = new javax.swing.GroupLayout(authorDialog.getContentPane());
        authorDialog.getContentPane().setLayout(authorDialogLayout);
        authorDialogLayout.setHorizontalGroup(
            authorDialogLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(authorDialogLayout.createSequentialGroup()
                .addContainerGap()
                .addComponent(authorAvatarLabel)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addGroup(authorDialogLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(authorIndexLabel)
                    .addComponent(authorMailLabel)
                    .addComponent(authorNameLabel))
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );
        authorDialogLayout.setVerticalGroup(
            authorDialogLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(authorDialogLayout.createSequentialGroup()
                .addContainerGap()
                .addGroup(authorDialogLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                    .addGroup(authorDialogLayout.createSequentialGroup()
                        .addComponent(authorNameLabel)
                        .addGap(18, 18, 18)
                        .addComponent(authorIndexLabel)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                        .addComponent(authorMailLabel))
                    .addComponent(authorAvatarLabel))
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );

        authorDialog.setLocationRelativeTo(rootPane);

        startDialog.setMinimumSize(new java.awt.Dimension(460, 470));

        startAliveTimeoutLabel.setText("Време провере");

        startNoThreadsLabel.setText("Максималан број послова");

        startWaitTimeoutLabel.setText("Време чекања");

        startFirstServerChoiceLabel.setText("Први сервер?");

        startFirstServerYes.setSelected(true);
        startFirstServerYes.setText("Да");
        startFirstServerYes.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                startFirstServerYesActionPerformed(evt);
            }
        });

        startOperatorAddressLabel.setText("Серверска адреса");

        startGlobalCentralPortLabel.setText("Глобални централи порт");

        startOperatorPrefixLabel.setText("Префикси");

        startOperatorNameLabel.setText("Име оператера");

        startButtonCancel.setText("Одустани");
        startButtonCancel.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                startButtonCancelActionPerformed(evt);
            }
        });

        startButtonOK.setText("У реду");
        startButtonOK.setMaximumSize(new java.awt.Dimension(102, 25));
        startButtonOK.setMinimumSize(new java.awt.Dimension(102, 25));
        startButtonOK.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                startButtonOKActionPerformed(evt);
            }
        });

        startCentralAddressLabel.setText("Централна адреса");

        startCentralPortLabel.setText("Централни порт");

        startOperatorPortLabel.setText("Операторски порт");

        startFirstServerNo.setText("Не");
        startFirstServerNo.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                startFirstServerNoActionPerformed(evt);
            }
        });

        startClientPortLabel.setText("Клијентски порт");

        javax.swing.GroupLayout startDialogLayout = new javax.swing.GroupLayout(startDialog.getContentPane());
        startDialog.getContentPane().setLayout(startDialogLayout);
        startDialogLayout.setHorizontalGroup(
            startDialogLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(startDialogLayout.createSequentialGroup()
                .addContainerGap()
                .addGroup(startDialogLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                    .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, startDialogLayout.createSequentialGroup()
                        .addComponent(startOperatorAddressLabel)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                        .addComponent(startOperatorAddressTextField, javax.swing.GroupLayout.PREFERRED_SIZE, 120, javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, startDialogLayout.createSequentialGroup()
                        .addGroup(startDialogLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(startNoThreadsLabel)
                            .addComponent(startFirstServerChoiceLabel))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 129, Short.MAX_VALUE)
                        .addGroup(startDialogLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addGroup(startDialogLayout.createSequentialGroup()
                                .addComponent(startFirstServerYes)
                                .addGap(18, 18, 18)
                                .addComponent(startFirstServerNo))
                            .addComponent(startNoThreadsTextField, javax.swing.GroupLayout.PREFERRED_SIZE, 120, javax.swing.GroupLayout.PREFERRED_SIZE)))
                    .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, startDialogLayout.createSequentialGroup()
                        .addGroup(startDialogLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(startClientPortLabel)
                            .addComponent(startAliveTimeoutLabel)
                            .addComponent(startWaitTimeoutLabel))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 200, Short.MAX_VALUE)
                        .addGroup(startDialogLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(startWaitTimeoutTextField, javax.swing.GroupLayout.PREFERRED_SIZE, 120, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(startAliveTimeoutTextField, javax.swing.GroupLayout.PREFERRED_SIZE, 120, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(startClientPortTextField, javax.swing.GroupLayout.PREFERRED_SIZE, 120, javax.swing.GroupLayout.PREFERRED_SIZE)))
                    .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, startDialogLayout.createSequentialGroup()
                        .addComponent(startOperatorPortLabel)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                        .addComponent(startOperatorPortTextField, javax.swing.GroupLayout.PREFERRED_SIZE, 120, javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, startDialogLayout.createSequentialGroup()
                        .addComponent(startCentralPortLabel)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                        .addComponent(startCentralPortTextField, javax.swing.GroupLayout.PREFERRED_SIZE, 120, javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, startDialogLayout.createSequentialGroup()
                        .addComponent(startGlobalCentralPortLabel)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                        .addComponent(startGlobalCentralPortTextField, javax.swing.GroupLayout.PREFERRED_SIZE, 120, javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, startDialogLayout.createSequentialGroup()
                        .addComponent(startCentralAddressLabel)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                        .addComponent(startCentralAddressTextField, javax.swing.GroupLayout.PREFERRED_SIZE, 120, javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, startDialogLayout.createSequentialGroup()
                        .addComponent(startOperatorPrefixLabel)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                        .addComponent(startOperatorPrefixTextField, javax.swing.GroupLayout.PREFERRED_SIZE, 120, javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, startDialogLayout.createSequentialGroup()
                        .addComponent(startOperatorNameLabel)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 204, Short.MAX_VALUE)
                        .addComponent(startOperatorNameTextField, javax.swing.GroupLayout.PREFERRED_SIZE, 120, javax.swing.GroupLayout.PREFERRED_SIZE)))
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, startDialogLayout.createSequentialGroup()
                .addContainerGap(238, Short.MAX_VALUE)
                .addComponent(startButtonOK, javax.swing.GroupLayout.PREFERRED_SIZE, 95, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addComponent(startButtonCancel)
                .addContainerGap())
        );
        startDialogLayout.setVerticalGroup(
            startDialogLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(startDialogLayout.createSequentialGroup()
                .addContainerGap()
                .addGroup(startDialogLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(startOperatorNameTextField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(startOperatorNameLabel))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addGroup(startDialogLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(startOperatorPrefixTextField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(startOperatorPrefixLabel))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addGroup(startDialogLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(startCentralAddressTextField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(startCentralAddressLabel))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addGroup(startDialogLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(startGlobalCentralPortTextField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(startGlobalCentralPortLabel))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addGroup(startDialogLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(startCentralPortTextField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(startCentralPortLabel))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addGroup(startDialogLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(startOperatorPortTextField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(startOperatorPortLabel))
                .addGap(12, 12, 12)
                .addGroup(startDialogLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(startClientPortTextField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(startClientPortLabel))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addGroup(startDialogLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(startAliveTimeoutTextField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(startAliveTimeoutLabel))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addGroup(startDialogLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(startWaitTimeoutTextField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(startWaitTimeoutLabel))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addGroup(startDialogLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(startNoThreadsTextField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(startNoThreadsLabel))
                .addGap(18, 18, 18)
                .addGroup(startDialogLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(startFirstServerYes)
                    .addComponent(startFirstServerNo)
                    .addComponent(startFirstServerChoiceLabel))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addGroup(startDialogLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                    .addComponent(startOperatorAddressTextField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(startOperatorAddressLabel))
                .addGap(18, 18, Short.MAX_VALUE)
                .addGroup(startDialogLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(startButtonOK, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(startButtonCancel))
                .addContainerGap())
        );

        startDialogLayout.linkSize(javax.swing.SwingConstants.VERTICAL, new java.awt.Component[] {startFirstServerNo, startFirstServerYes});

        startOperatorAddressLabel.setVisible(false);
        startOperatorAddressTextField.setVisible(false);

        startDialog.setLocationRelativeTo(rootPane);

        setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
        setTitle(" Оператер");
        setCursor(new java.awt.Cursor(java.awt.Cursor.DEFAULT_CURSOR));

        redirectedTextArea.setColumns(20);
        redirectedTextArea.setEditable(false);
        redirectedTextArea.setRows(5);
        redirectedScrollPane.setViewportView(redirectedTextArea);

        jTabbedPane.addTab("Излаз", redirectedScrollPane);

        operatorServerStatus.setFont(new java.awt.Font("Dialog", 1, 14));
        operatorServerStatus.setForeground(new java.awt.Color(255, 0, 0));
        operatorServerStatus.setText("Угашен");
        operatorServerStatus.setToolTipText("");

        operatorServerStatusLabel.setFont(new java.awt.Font("Dialog", 1, 14));
        operatorServerStatusLabel.setText("Статус");

        operatorServerStatusTimer.setFont(new java.awt.Font("Dialog", 1, 14));
        operatorServerStatusTimer.setText("00:00:00");
        operatorServerStatusTimer.setEnabled(false);

        centralAddressLabel.setText("Централна адреса");
        centralAddressLabel.setEnabled(false);

        centralAddress.setForeground(new java.awt.Color(0, 0, 255));
        centralAddress.setText("      ");

        centralPortLabel.setText("Централни порт");
        centralPortLabel.setEnabled(false);

        centralPort.setForeground(new java.awt.Color(0, 0, 255));
        centralPort.setText("      ");

        operatorPortLabel.setText("Операторски порт");
        operatorPortLabel.setEnabled(false);

        operatorPort.setForeground(new java.awt.Color(0, 0, 255));
        operatorPort.setText("      ");

        clientPort.setForeground(new java.awt.Color(0, 0, 255));
        clientPort.setText("      ");

        clientPortLabel.setText("Клијентски порт");
        clientPortLabel.setEnabled(false);

        aliveTimeoutLabel.setText("Време провере");
        aliveTimeoutLabel.setEnabled(false);

        aliveTimeout.setForeground(new java.awt.Color(0, 0, 255));
        aliveTimeout.setText("      ");

        waitTimeout.setForeground(new java.awt.Color(0, 0, 255));
        waitTimeout.setText("      ");

        waitTimeoutLabel.setText("Време чекања");
        waitTimeoutLabel.setEnabled(false);

        noThreadsLabel.setText("Максималан број послова");
        noThreadsLabel.setEnabled(false);

        noThreads.setForeground(new java.awt.Color(0, 0, 255));
        noThreads.setText("      ");

        lastTimeSynchronizedLabel.setText("Синхронизован последњи пут");
        lastTimeSynchronizedLabel.setEnabled(false);

        lastTimeSynchronized.setForeground(new java.awt.Color(0, 0, 255));
        lastTimeSynchronized.setText("00:00");
        lastTimeSynchronized.setEnabled(false);

        myAddressLabel.setFont(new java.awt.Font("Dialog", 1, 14));
        myAddressLabel.setText("Моја адреса");
        myAddressLabel.setEnabled(false);

        myAddress.setFont(new java.awt.Font("Dialog", 1, 14));
        myAddress.setForeground(new java.awt.Color(0, 0, 255));
        myAddress.setText(" ");

        prefixesLabel.setText("Префикси");
        prefixesLabel.setEnabled(false);

        prefixes.setForeground(new java.awt.Color(0, 0, 255));
        prefixes.setText("      ");

        globalCentralPort.setForeground(new java.awt.Color(0, 0, 255));
        globalCentralPort.setText("      ");

        globalPortLabel.setText("Глобални централни порт");
        globalPortLabel.setEnabled(false);

        fileMenu.setMnemonic('f');
        fileMenu.setText("Мени");

        startMenuItem.setMnemonic('o');
        startMenuItem.setText("Старт");
        startMenuItem.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                startMenuItemActionPerformed(evt);
            }
        });
        fileMenu.add(startMenuItem);

        exitMenuItem.setMnemonic('x');
        exitMenuItem.setText("Изађи");
        exitMenuItem.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                exitMenuItemActionPerformed(evt);
            }
        });
        fileMenu.add(exitMenuItem);

        menuBar.add(fileMenu);

        helpMenu.setMnemonic('h');
        helpMenu.setText("Помоћ");

        authorMenuItem.setMnemonic('a');
        authorMenuItem.setText("Аутор");
        authorMenuItem.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                authorMenuItemActionPerformed(evt);
            }
        });
        helpMenu.add(authorMenuItem);

        menuBar.add(helpMenu);

        setJMenuBar(menuBar);

        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
        getContentPane().setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(myAddressLabel)
                .addGap(18, 18, 18)
                .addComponent(myAddress)
                .addGap(184, 184, 184)
                .addComponent(operatorServerStatusLabel)
                .addGap(60, 60, 60)
                .addComponent(operatorServerStatus)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 309, Short.MAX_VALUE)
                .addComponent(operatorServerStatusTimer)
                .addContainerGap())
            .addComponent(jSeparator1, javax.swing.GroupLayout.DEFAULT_SIZE, 887, Short.MAX_VALUE)
            .addGroup(layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(globalPortLabel)
                    .addComponent(clientPortLabel)
                    .addComponent(centralAddressLabel)
                    .addComponent(centralPortLabel)
                    .addComponent(operatorPortLabel))
                .addGap(116, 116, 116)
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                    .addComponent(centralPort)
                    .addComponent(globalCentralPort)
                    .addComponent(centralAddress)
                    .addComponent(operatorPort)
                    .addComponent(clientPort))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 185, Short.MAX_VALUE)
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                    .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
                        .addComponent(lastTimeSynchronizedLabel)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                        .addComponent(lastTimeSynchronized))
                    .addGroup(layout.createSequentialGroup()
                        .addComponent(noThreadsLabel)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                        .addComponent(noThreads))
                    .addGroup(layout.createSequentialGroup()
                        .addComponent(waitTimeoutLabel)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                        .addComponent(waitTimeout))
                    .addGroup(layout.createSequentialGroup()
                        .addComponent(aliveTimeoutLabel)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                        .addComponent(aliveTimeout))
                    .addGroup(layout.createSequentialGroup()
                        .addComponent(prefixesLabel)
                        .addGap(258, 258, 258)
                        .addComponent(prefixes)))
                .addContainerGap())
            .addComponent(jSeparator2, javax.swing.GroupLayout.DEFAULT_SIZE, 887, Short.MAX_VALUE)
            .addComponent(jTabbedPane, javax.swing.GroupLayout.DEFAULT_SIZE, 887, Short.MAX_VALUE)
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addGap(18, 18, 18)
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(operatorServerStatusTimer)
                    .addComponent(myAddressLabel)
                    .addComponent(myAddress)
                    .addComponent(operatorServerStatusLabel)
                    .addComponent(operatorServerStatus))
                .addGap(18, 18, 18)
                .addComponent(jSeparator1, javax.swing.GroupLayout.PREFERRED_SIZE, 10, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(layout.createSequentialGroup()
                        .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(centralAddressLabel)
                            .addComponent(prefixes)
                            .addComponent(prefixesLabel))
                        .addGap(18, 18, 18)
                        .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(globalPortLabel)
                            .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                                .addComponent(aliveTimeoutLabel)
                                .addComponent(aliveTimeout)))
                        .addGap(18, 18, 18)
                        .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addGroup(layout.createSequentialGroup()
                                .addComponent(centralPortLabel)
                                .addGap(18, 18, 18)
                                .addComponent(operatorPortLabel)
                                .addGap(18, 18, 18)
                                .addComponent(clientPortLabel))
                            .addGroup(layout.createSequentialGroup()
                                .addComponent(waitTimeoutLabel)
                                .addGap(18, 18, 18)
                                .addComponent(noThreadsLabel)
                                .addGap(18, 18, 18)
                                .addComponent(lastTimeSynchronizedLabel))
                            .addGroup(layout.createSequentialGroup()
                                .addComponent(waitTimeout)
                                .addGap(18, 18, 18)
                                .addComponent(noThreads)
                                .addGap(18, 18, 18)
                                .addComponent(lastTimeSynchronized))))
                    .addGroup(layout.createSequentialGroup()
                        .addComponent(centralAddress)
                        .addGap(18, 18, 18)
                        .addComponent(globalCentralPort)
                        .addGap(18, 18, 18)
                        .addComponent(centralPort)
                        .addGap(18, 18, 18)
                        .addComponent(operatorPort)
                        .addGap(18, 18, 18)
                        .addComponent(clientPort)))
                .addGap(18, 18, 18)
                .addComponent(jSeparator2, javax.swing.GroupLayout.PREFERRED_SIZE, 10, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addComponent(jTabbedPane, javax.swing.GroupLayout.DEFAULT_SIZE, 381, Short.MAX_VALUE))
        );

        pack();
    }// </editor-fold>//GEN-END:initComponents

    private void exitMenuItemActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_exitMenuItemActionPerformed
        System.exit(0);
    }//GEN-LAST:event_exitMenuItemActionPerformed

private void startMenuItemActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_startMenuItemActionPerformed
    if (OperatorServer.existsConfugration()) {
        operatorServer = new OperatorServer();
        setServerOnline();
    } else {
        startDialog.setVisible(true);
    }
    startMenuItem.setEnabled(false);
}//GEN-LAST:event_startMenuItemActionPerformed

private void startButtonOKActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_startButtonOKActionPerformed
    startDialog.setVisible(false);

    String test = null;
    int testbr;

    String operatorNameIn = null;
    String[] prefixesIn = null;
    String centralAddressIn = null;
    int globalCentralPortIn = 0;
    int centralPortIn = 0;
    int operatorPortIn = 0;
    int clientPortIn = 0;
    int aliveTimeoutIn = 0;
    int waitTimeoutIn = 0;
    int noThreadsIn = 0;
    String operatorAddress = null;
    try {
        test = startOperatorNameTextField.getText();
        if (test == null || test.equals("")) {
            throw new IOException();
        }
        operatorNameIn = test;
        test = null;

        test = startOperatorPrefixTextField.getText();
        if (test == null || test.equals("")) {
            throw new IOException();
        }
        prefixesIn = test.split(" ");
        for (int i = 0; i < prefixesIn.length; i++) {
            if (prefixesIn[i].length() != 3) {
                throw new IOException();
            }
            Integer.parseInt(prefixesIn[i]);
        }
        test = null;

        test = startCentralAddressTextField.getText();
        if (test == null || test.equals("")) {
            throw new IOException();
        }
        centralAddressIn = test;
        test = null;

        test = startGlobalCentralPortTextField.getText();
        if (test == null || test.equals("")) {
            throw new IOException();
        }
        testbr = Integer.parseInt(test);
        if (testbr <= 0) {
            throw new IOException();
        }
        globalCentralPortIn = testbr;
        test = null;
        testbr = 0;

        test = startCentralPortTextField.getText();
        if (test == null || test.equals("")) {
            throw new IOException();
        }
        testbr = Integer.parseInt(test);
        if (testbr <= 0) {
            throw new IOException();
        }
        centralPortIn = testbr;
        test = null;
        testbr = 0;

        test = startOperatorPortTextField.getText();
        if (test == null || test.equals("")) {
            throw new IOException();
        }
        testbr = Integer.parseInt(test);
        if (testbr <= 0) {
            throw new IOException();
        }
        operatorPortIn = testbr;
        test = null;
        testbr = 0;

        test = startClientPortTextField.getText();
        if (test == null || test.equals("")) {
            throw new IOException();
        }
        testbr = Integer.parseInt(test);
        if (testbr <= 0) {
            throw new IOException();
        }
        clientPortIn = testbr;
        test = null;
        testbr = 0;

        test = startAliveTimeoutTextField.getText();
        if (test == null || test.equals("")) {
            throw new IOException();
        }
        testbr = Integer.parseInt(test);
        if (testbr <= 0) {
            throw new IOException();
        }
        aliveTimeoutIn = testbr;
        test = null;
        testbr = 0;

        test = startWaitTimeoutTextField.getText();
        if (test == null || test.equals("")) {
            throw new IOException();
        }
        testbr = Integer.parseInt(test);
        if (testbr <= 0) {
            throw new IOException();
        }
        waitTimeoutIn = testbr;
        test = null;
        testbr = 0;

        test = startNoThreadsTextField.getText();
        if (test == null || test.equals("")) {
            throw new IOException();
        }
        testbr = Integer.parseInt(test);
        if (testbr <= 0) {
            throw new IOException();
        }
        noThreadsIn = testbr;
        test = null;
        testbr = 0;

        if (startFirstServerNo.isSelected()) {
            test = startOperatorAddressTextField.getText();
            if (test == null || test.equals("")) {
                throw new IOException();
            }
            operatorAddress = test;
            test = null;
        }

    } catch (NumberFormatException ex) {
        JOptionPane.showMessageDialog(this, ex.toString(), "Грешка", JOptionPane.ERROR_MESSAGE);
        startDialog.setVisible(true);
        return;
    } catch (IOException ex) {
        JOptionPane.showMessageDialog(this, "Нису унети сви параметри", "Грешка", JOptionPane.ERROR_MESSAGE);
        startDialog.setVisible(true);
        return;
    }

    operatorServer = new OperatorServer(operatorNameIn, prefixesIn, centralAddressIn, globalCentralPortIn, operatorAddress, operatorPortIn, clientPortIn, aliveTimeoutIn, waitTimeoutIn, noThreadsIn, centralPortIn);
    setServerOnline();
}//GEN-LAST:event_startButtonOKActionPerformed

private void startButtonCancelActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_startButtonCancelActionPerformed
    startDialog.setVisible(false);
    startMenuItem.setEnabled(true);

    startOperatorNameTextField.setText(null);
    startCentralAddressTextField.setText(null);
    startCentralPortTextField.setText(null);
    startOperatorPortTextField.setText(null);
    startClientPortTextField.setText(null);
    startAliveTimeoutTextField.setText(null);
    startWaitTimeoutTextField.setText(null);
    startNoThreadsTextField.setText(null);
    startOperatorAddressTextField.setText(null);

    startOperatorAddressLabel.setVisible(false);
    startOperatorAddressTextField.setVisible(false);
    startFirstServerNo.setSelected(false);
    startFirstServerYes.setSelected(true);
}//GEN-LAST:event_startButtonCancelActionPerformed

private void startFirstServerYesActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_startFirstServerYesActionPerformed
    startOperatorAddressLabel.setVisible(false);
    startOperatorAddressTextField.setVisible(false);
    startFirstServerNo.setSelected(false);
    startFirstServerYes.setSelected(true);
}//GEN-LAST:event_startFirstServerYesActionPerformed

private void startFirstServerNoActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_startFirstServerNoActionPerformed
    startOperatorAddressLabel.setVisible(true);
    startOperatorAddressTextField.setVisible(true);
    startFirstServerYes.setSelected(false);
    startFirstServerNo.setSelected(true);
}//GEN-LAST:event_startFirstServerNoActionPerformed

private void authorMenuItemActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_authorMenuItemActionPerformed
    authorDialog.setVisible(true);
}//GEN-LAST:event_authorMenuItemActionPerformed

    /**
     * @param args the command line arguments
     */
    public static void main(String args[]) {

        /* Create and display the form */
        java.awt.EventQueue.invokeLater(new Runnable() {

            public void run() {
                new OperatorServerApplication().setVisible(true);
            }
        });
    }
    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JLabel aliveTimeout;
    private javax.swing.JLabel aliveTimeoutLabel;
    private javax.swing.JLabel authorAvatarLabel;
    private javax.swing.JDialog authorDialog;
    private javax.swing.JLabel authorIndexLabel;
    private javax.swing.JLabel authorMailLabel;
    private javax.swing.JMenuItem authorMenuItem;
    private javax.swing.JLabel authorNameLabel;
    private javax.swing.JLabel centralAddress;
    private javax.swing.JLabel centralAddressLabel;
    private javax.swing.JLabel centralPort;
    private javax.swing.JLabel centralPortLabel;
    private javax.swing.JLabel clientPort;
    private javax.swing.JLabel clientPortLabel;
    private javax.swing.JMenuItem exitMenuItem;
    private javax.swing.JMenu fileMenu;
    private javax.swing.JLabel globalCentralPort;
    private javax.swing.JLabel globalPortLabel;
    private javax.swing.JMenu helpMenu;
    private javax.swing.JSeparator jSeparator1;
    private javax.swing.JSeparator jSeparator2;
    private javax.swing.JTabbedPane jTabbedPane;
    private javax.swing.JLabel lastTimeSynchronized;
    private javax.swing.JLabel lastTimeSynchronizedLabel;
    private javax.swing.JMenuBar menuBar;
    private javax.swing.JLabel myAddress;
    private javax.swing.JLabel myAddressLabel;
    private javax.swing.JLabel noThreads;
    private javax.swing.JLabel noThreadsLabel;
    private javax.swing.JLabel operatorPort;
    private javax.swing.JLabel operatorPortLabel;
    private javax.swing.JLabel operatorServerStatus;
    private javax.swing.JLabel operatorServerStatusLabel;
    private javax.swing.JLabel operatorServerStatusTimer;
    private javax.swing.JLabel prefixes;
    private javax.swing.JLabel prefixesLabel;
    private javax.swing.JScrollPane redirectedScrollPane;
    private javax.swing.JTextArea redirectedTextArea;
    private javax.swing.JLabel startAliveTimeoutLabel;
    private javax.swing.JFormattedTextField startAliveTimeoutTextField;
    private javax.swing.JButton startButtonCancel;
    private javax.swing.JButton startButtonOK;
    private javax.swing.JLabel startCentralAddressLabel;
    private javax.swing.JFormattedTextField startCentralAddressTextField;
    private javax.swing.JLabel startCentralPortLabel;
    private javax.swing.JFormattedTextField startCentralPortTextField;
    private javax.swing.JLabel startClientPortLabel;
    private javax.swing.JFormattedTextField startClientPortTextField;
    private javax.swing.JDialog startDialog;
    private javax.swing.JLabel startFirstServerChoiceLabel;
    private javax.swing.JRadioButton startFirstServerNo;
    private javax.swing.JRadioButton startFirstServerYes;
    private javax.swing.JLabel startGlobalCentralPortLabel;
    private javax.swing.JFormattedTextField startGlobalCentralPortTextField;
    private javax.swing.JMenuItem startMenuItem;
    private javax.swing.JLabel startNoThreadsLabel;
    private javax.swing.JFormattedTextField startNoThreadsTextField;
    private javax.swing.JLabel startOperatorAddressLabel;
    private javax.swing.JFormattedTextField startOperatorAddressTextField;
    private javax.swing.JLabel startOperatorNameLabel;
    private javax.swing.JFormattedTextField startOperatorNameTextField;
    private javax.swing.JLabel startOperatorPortLabel;
    private javax.swing.JFormattedTextField startOperatorPortTextField;
    private javax.swing.JLabel startOperatorPrefixLabel;
    private javax.swing.JFormattedTextField startOperatorPrefixTextField;
    private javax.swing.JLabel startWaitTimeoutLabel;
    private javax.swing.JFormattedTextField startWaitTimeoutTextField;
    private javax.swing.JLabel waitTimeout;
    private javax.swing.JLabel waitTimeoutLabel;
    // End of variables declaration//GEN-END:variables
    private OperatorServer operatorServer;
}
